package com.crm.utils;

import com.crm.exception.BaseException;

public class DeptValidator {
    public static void validateDeptName(String deptName) {
        if (deptName == null || deptName.trim().isEmpty()) {
            throw new BaseException("部门名称不能为空");
        }
        if (deptName.length() < 1 || deptName.length() > 12) {
            throw new BaseException("部门名称必须为 1-12 个字符");
        }
    }
}
